package com.wei.service_msm.util;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author wjx
 * @ClassName ConstantPropertiesUtil
 * @description: TODO
 * @date 2022-12-03 08:45
 * @version: 1.0
 */
@Component
public class ConstantPropertiesUtil implements InitializingBean {

    @Value("${tencent.msm.id}")
    private String secretID;

    @Value("${tencent.msm.secret}")
    public String secretKey;

    @Value("${tencent.msm.appId}")
    public String appId;

    @Value("${tencent.msm.signName}")
    public String signName;

    @Value("${tencent.msm.templateId}")
    public String templateId;

    public static String SECRET_ID;
    public static String SECRET_KEY;
    public static String APP_ID;
    public static String SIGN_NAME;
    public static String TEMPLATE_ID;

    @Override
    public void afterPropertiesSet() throws Exception {
        SECRET_ID = secretID;
        SECRET_KEY = secretKey;
        APP_ID = appId;
        SIGN_NAME = signName;
        TEMPLATE_ID = templateId;
    }

}
